<template>
  <div id="classes">
    <h2>{{className| mySlice}}</h2>
    <button @click="transfName">获取名称</button>
    <button @click="sentName">给兄弟组件Student发送数据</button>
  </div>
</template>

<script>
import {mount} from "../../minin";

export default {
  name: "Classes",
  props:['className'],
  mixins:[mount],
  activated() {
    console.log("school1组件激活了")
  },
  deactivated() {
    console.log("school2组件失活了")
  },
  methods:{
    transfName(){
      this.$emit('getName','玉石')
    },
    sentName(){
      this.$bus.$emit('hello',666)
    }
  }
}
</script>

<style scoped>

</style>
